package com.jims.api.handler;

import org.apache.log4j.Logger;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MyDefaultHandlerExceptionResolver extends DefaultHandlerExceptionResolver {
	private Logger log = Logger.getLogger(MyDefaultHandlerExceptionResolver.class);
	
	@Override  
	protected ModelAndView doResolveException(HttpServletRequest request, HttpServletResponse response, Object handler,
			Exception ex) {
		log.error(request.getRequestURI(), ex);
		return super.doResolveException(request, response, handler, ex);
	}
}
